for $b in document("bib.xml")//book
where exists($b/author)
return $b
